<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>
    <button id="btn">按钮</button>
    <p id="p1">D</p>
<body>
    <script>
        let button = document.getElementById('btn');
        let p = document.getElementById('p1')
        function charToUnicode(str) {
                let temp;
                let i = 0;
                let r = '';

                for (let val of str) {
                    temp = val.codePointAt(0).toString(16);

                    while (temp.length < 4)
                        temp = '0' + temp;

                    r += '＼＼u' + temp;
                };

                return r;
            }
        addEventListener(button, 'click',function(){
            // for (var i = 0; i < 25; i++) {
            //     alert(String.fromCharCode((65 + i)));
            // }
        })
        
    </script>
</body>
</html>